<php>
$columns=0;
$allcolumns=0;
</php>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class='ttable'>
<caption class='tcat'><a href="forumdisplay.php{sessionurl}f={$cat_data['id']}">{$cat_data['name']}</a></caption>
<tbody class="tbody">
	<tr class="item_list" onmouseover="this.className='item_change';" onmouseout="this.className='item_list';">
	<php>
		$forum_count = count($forums->forum->forum_cache[ $cat_data['id'] ]);
	</php>
	<foreach="$forums->forum->forum_cache[ $cat_data['id'] ] as $id => $forum_data">
		<php>
			$subforum = $forums->forum->forums_format_lastinfo($forum_data);
			++$columns;
			++$allcolumns;
		</php>
		<td width="1%">
			<if="$subforum['img_new_post']=='readonly'">
			<img class="inline" src='images/<#IMAGE#>/bf_readonly.gif' alt='{$lang['_readonly']}' />
			<elseif="$subforum['img_new_post']=='brnew'">
			<img class="inline" src='images/<#IMAGE#>/br_new.gif' alt='{$lang['_newpost']}' />
			<elseif="$subforum['img_new_post']=='bfnew'">
			<img class="inline" src='images/<#IMAGE#>/bf_new.gif' alt='{$lang['_newpost']}' />
			<elseif="$subforum['img_new_post']=='brnonew'">
			<img class="inline" src='images/<#IMAGE#>/br_nonew.gif' alt='{$lang['_nonewpost']}' />
			<elseif="$subforum['img_new_post']=='bfnonew'">
			<img class="inline" src='images/<#IMAGE#>/bf_nonew.gif' alt='{$lang['_nonewpost']}' />
			</if>
		</td>
		<td width="10%">
		<if="$subforum['url']">
			<h2><a href="{$subforum['url']}" target='_blank'>{$subforum['name']}</a></h2>
		<else>
			<h2><a href="forumdisplay.php{sessionurl}f={$subforum['id']}" title="{$lang['lastpost']}: {$subforum['lastpost']}">{$subforum['name']}</a></h2>&nbsp;
			<if="$subforum['lastthread']">
				<span class='time'>{$subforum['lastposttime']}</span>
			</if>

			<div class="desc">{$lang['_thread']}: {$subforum['thread']} | {$lang['_post']}: {$subforum['post']}<if="$bboptions['showtoday']"> | {$lang['_today']}: {$subforum['todaypost']}</if></div>
			<div class="desc">
			</div>
		</if>
		</td>
		<if="$columns == $cat_data['forumcolumns'] AND $allcolumns != $forum_count">
	</tr>
	<tr class="item_list" onmouseover="this.className='item_change';" onmouseout="this.className='item_list';">
			<php>$columns=0;</php>
		</if>
	</foreach>
	<if="$columns != $cat_data['forumcolumns']">
		<php>
		for ($i = $columns ; $i < $cat_data['forumcolumns'] ; ++$i) {
		</php>
		<td width="1%">&nbsp;</td>
		<td width="10%">&nbsp;</td>
		<php>
		}
		</php>
	</if>
	</tr>
</tbody>
</table>